<template>
	<view>
		<view class="articleDetil">
			系统消息提醒
		</view>
		<view class="articleDetil_time">
			3分钟前
		</view>
		<view class="essay_cent">
			<!-- <jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser> -->
			a十大阿卡斯打开啦到啦大家拉德季拉到家啦登录
		</view>
		<view style="width: 100%;height: 300rpx;"></view>
		<!-- <u-loading-page :loading="isloging"></u-loading-page> -->
	</view>
</template>

<script>
	import jyfParser from "@/components/jyf-parser/jyf-parser";
	export default {
		components: {
			jyfParser
		}, 
		data() {
			return {
				content: '', //富文本
				tagStyle: {
					img: 'display: block;width: 100%!important;height:auto!important;',
					p: 'margin-bottom: 10rpx;line-height: 50rpx;padding: 0 20rpx;'
				},
				ids:0,
				ouoinf:{},
				isloging: false,
			}
		},
		onLoad(option) {
			// this.ids =  option.id
			// //查询文章详情
			// this.getAbout(option.id)
		},
		methods: {
			//查询文章详情
			async getAbout(id) {
				this.isloging = true
				let data = await this.$api.noticeInfo({id:id});
				const regex = new RegExp('<img', 'gi');
				this.ouoinf = data.data;
				var richtext = data.data.content
				richtext = richtext.replace(/<table[^>]*>/gi,
					'<table cellpadding="0" cellspacing="0" max-width="100%" border="1" style="font-size:24rpx;max-width:100%; text-align:left;text-indent: 0em;line-height:24rpx;">'
				);
				this.content = richtext.replace(regex, `<img style="max-width: 100%;"`);
				this.isloging = false
			},
		}
	}
</script>

<style lang="scss">
	.articleDetil{
		color: #000;
		font-size: 40rpx;
		font-weight: bold;
		margin-top: 24rpx;
		margin-bottom: 16rpx;
		margin-left: 32rpx;
		margin-right: 32rpx;
	}	
	.articleDetil_time{
		color: #909399; 
		margin-left: 32rpx;
		font-size: 28rpx;
		font-weight: 400;
	}
	.essay_cent {
		width: 686rpx;
		font-size: 30rpx;
		font-weight: 400;
		letter-spacing: 10rpx;
		line-height: 50rpx;
		color: #303133;
		margin-left: 32rpx;
		margin-top: 24rpx;
	
	}
</style>
